import _ from 'lodash';

function throttle(callback, option = {}) {
	let optiton = Object.assign(
		{
			duration: 150,
			trailing: true,
		},
		option
	);
	return _.throttle(callback, optiton.duration, {
		trailing: optiton.trailing,
	});
}

export { throttle };
